import { getAction, deleteAction, putAction, postAction, downFilePost, downFile, uploadAction } from '@/api/manage'
/**
 * 物资管理
 */
//列表
const listIndex = params => getAction(`/xl-material/list`,params)
//新增
const resCreate = params => postAction(`/xl-material/save`,params)
//编辑
const resText = params => postAction(`/xl-material/update`,params)
//文件导入模板下载
// const getExcel = () => getAction(`/xl-material/importTemplate`)
const getExcel = params => downFile(`/excel/getExcel`,params)
//文件导入
const updetaExcel = params => uploadAction(`/xl-material/importExcel`,params)


//物资上边详情
const topXiangping = params => getAction(`/xl-material/details/${params}`)
//物资详情列表
const detailsList = params => getAction(`/xl-material/detailsList`,params)
//物资调用记录
const getInformation = params => getAction(`/xl-material-invoke-information/list`,params)
//物资调用
const transfer = params => postAction(`/xl-material-invoke-information/transfer`,params)
//删除物资
const deleteWz = params => deleteAction(`/xl-material/delete/${params}`)
//编辑物资
const updateWz = params => postAction(`/xl-material/update`,params)
//获取对应事件详情
const detailsRY = params => getAction(`/workbench/details`,params)

//获取重新发起内容
const reissueDetails = params => getAction(`/xl-material-invoke-information/reissueDetails/${params}`)
//修改调用信息并重新发起
const relaunch = params => postAction(`/xl-material-invoke-information/relaunch`,params)
export {
  relaunch,
  reissueDetails,
  detailsRY,
  listIndex,resCreate,resText,getExcel,updetaExcel
  ,topXiangping,
  detailsList,
  getInformation,
  transfer,
  deleteWz,
  updateWz
}
